﻿<Application x:Class="CommandAggregatorExample.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Application.Resources>

        <!--  Marc's beautiful dock panel background  -->
        <Style TargetType="DockPanel" x:Key="dockPanelStyle">
            <Setter Property="Background">
                <Setter.Value>
                    <RadialGradientBrush Center="0.2,0.2" RadiusX="1.5" RadiusY="0.9" GradientOrigin="0.3,0.3">
                        <GradientStopCollection>
                            <GradientStop Offset="0" Color="WhiteSmoke"/>
                            <GradientStop Offset="0.7" Color="LightBlue"/>
                            <GradientStop Offset="0.8" Color="WhiteSmoke"/>
                            <GradientStop Offset="1.1" Color="LightBlue"/>
                        </GradientStopCollection>
                    </RadialGradientBrush>
                </Setter.Value>
            </Setter>
        </Style>

        <!--  Marc's default button -->       
        <ControlTemplate x:Key="buttonTemplate" TargetType="{x:Type Button}">
            <Grid Margin="1,1,1,1">
                <Border x:Name="outerBorder" CornerRadius="12" BorderBrush="Transparent" BorderThickness="2">
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Offset="0" Color="LightYellow"/>
                            <GradientStop Offset="1" Color="Goldenrod"/>
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <Border x:Name="innerBorder" CornerRadius="12" RenderTransformOrigin="0.5,0.5">
                    <Border.RenderTransform>
                        <ScaleTransform ScaleX="0.9" ScaleY="0.9"></ScaleTransform>
                    </Border.RenderTransform>
                    <Border.Background>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                            <GradientStop Offset="0" Color="White"/>
                            <GradientStop Offset="1" Color="Transparent"/>
                        </LinearGradientBrush>
                    </Border.Background>
                </Border>
                <TextBlock x:Name="txtBtnBlock" FontSize="12" FontWeight="Bold" HorizontalAlignment="Center" VerticalAlignment="Center">
                <ContentPresenter ClipToBounds="True" Margin="5"/>
                </TextBlock>
            </Grid>
            <ControlTemplate.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter TargetName="outerBorder" Property="Background" Value="Blue"/>
                    <Setter Property="Foreground" Value="White"/>
                </Trigger>
                <Trigger Property="IsEnabled" Value="False">
                    <Setter TargetName="outerBorder" Property="Background" Value="Gray"/>
                    <Setter TargetName="outerBorder" Property="BorderBrush" Value="DarkGray"/>
                    <Setter TargetName="innerBorder" Property="Background" Value="LightGray"/>
                    <Setter TargetName="txtBtnBlock" Property="Foreground" Value="DarkGray"/>
                </Trigger>
            </ControlTemplate.Triggers>
        </ControlTemplate>
        
    </Application.Resources>
</Application>
